package com.example.buyticketlishi.RetrufitHelp;


import com.example.baselibrary.Bean.LiShiPointListResultBean;
import com.example.baselibrary.Bean.LiShifindLocationResultBean;
import com.example.baselibrary.Bean.LiShifindTerminalNameResultBean;
import com.example.buyticketlishi.bean.GetTravelAgencyListRequsetBean;
import com.example.buyticketlishi.bean.GetTravelAgencyListResultBean;
import com.example.buyticketlishi.bean.IpResult;
import com.example.buyticketlishi.bean.JJHCheckResultBean;
import com.example.buyticketlishi.bean.JJHCheckResultOtherBean;
import com.example.buyticketlishi.bean.JJHCheckTicketBean;
import com.example.buyticketlishi.bean.JJHCheckTicketOtherBean;
import com.example.buyticketlishi.bean.JJHCheckTicketOtherSecondBean;
import com.example.buyticketlishi.bean.JJHFindShipListRequestBean;
import com.example.buyticketlishi.bean.JJHFindShipListResultBean;
import com.example.buyticketlishi.bean.JJHLoginBean;
import com.example.buyticketlishi.bean.JJHLoginResult;
import com.example.buyticketlishi.bean.JJHPointListResultBean;
import com.example.buyticketlishi.bean.JJHSealTicketForTitleResultBean;
import com.example.buyticketlishi.bean.JJHSealTicketImforTitleBean;
import com.example.buyticketlishi.bean.JJHSealTitleBean;
import com.example.buyticketlishi.bean.JJHaddOrRelieveRequsetBean;
import com.example.buyticketlishi.bean.JJHaddOrRelieveResultBean;
import com.example.buyticketlishi.bean.JJHfindPointRequestBean;
import com.example.buyticketlishi.bean.JJHfindPointResultBean;
import com.example.buyticketlishi.bean.JJHfindRowboatOrderListRequestBean;
import com.example.buyticketlishi.bean.JJHfindRowboatOrderListResultBean;
import com.example.buyticketlishi.bean.JJHfindTerminalNameRequestBean;
import com.example.buyticketlishi.bean.JJHfindTerminalNameResultBean;
import com.example.buyticketlishi.bean.JJHgetAccessTokenByRefreshTokenBean;
import com.example.buyticketlishi.bean.JJHhandSetPayRequsetBean;
import com.example.buyticketlishi.bean.JJHhandSetPayResultBean;
import com.example.buyticketlishi.bean.JJHhandSetRequestBean;
import com.example.buyticketlishi.bean.JJHhandSetResultBean;
import com.example.buyticketlishi.bean.JJHterminalComputerRequestBean;
import com.example.buyticketlishi.bean.JJHterminalComputerResultBean;
import com.example.buyticketlishi.bean.LSVemPayOrderRequestBean;
import com.example.buyticketlishi.bean.LSVemPayOrderResultBean;
import com.example.buyticketlishi.bean.LiShihandSetReserveProductRequsetBean;
import com.example.buyticketlishi.bean.LiShihandSetReserveProductResultBean;
import com.example.buyticketlishi.bean.LiShihandSetReserveProductResultSecondBean;
import com.example.buyticketlishi.bean.RzSelectListRequsetBean;
import com.example.buyticketlishi.bean.RzSelectListResultBean;
import com.example.buyticketlishi.bean.RzfindTimeControlListRequestBean;
import com.example.buyticketlishi.bean.RzfindTimeControlListResultBean;
import com.example.buyticketlishi.bean.RzhandSetResultBean;
import com.example.buyticketlishi.bean.TicketInfo;
import com.example.buyticketlishi.bean.TicketResult;
import com.example.buyticketlishi.bean.TicketResultNew;
import com.example.buyticketlishi.bean.checkOrderOnlineRequsetBean;
import com.example.buyticketlishi.bean.checkOrderOnlineResultBean;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

/**
 * Created by Ｔａｍｉｃ on 2016-07-08.
 * {@link # https://github.com/NeglectedByBoss/RetrofitClient}
 */
public interface BaseApiService {

//    public static final String Base_URL = "http://ip.taobao.com/";

    /**
     * 普通写法
     */
    @GET("service/getIpInfo.php")
    Observable<BaseResponse<IpResult>> getData(@Query("ip") String ip);


    @GET("{url}")
    Observable<BaseResponse<Object>> executeGet(
            @Path("url") String url,
            @QueryMap Map<String, String> maps
    );


    @POST("{url}")
    Observable<ResponseBody> executePost(
            @Path("url") String url,
            //  @Header("") String authorization,
            @QueryMap Map<String, String> maps);

    @POST("{url}")
    Observable<ResponseBody> json(
            @Path("url") String url,
            @Body RequestBody jsonStr);

    @Multipart
    @POST("{url}")
    Observable<ResponseBody> upLoadFile(
            @Path("url") String url,
            @Part("image\"; filename=\"image.jpg") RequestBody requestBody);

    @POST("{url}")
    Call<ResponseBody> uploadFiles(
            @Path("url") String url,
            @Path("headers") Map<String, String> headers,
            @Part("filename") String description,
            @PartMap() Map<String, RequestBody> maps);

    @Streaming
    @GET
    Observable<ResponseBody> downloadFile(@Url String fileUrl);

    //自己的网络请求   中国银行项目
    @POST("unlogin/TicketCheck")
    Observable<BaseResponse<TicketResult>> TicketCheck(@Body TicketInfo ticketInfo);

    @POST("unlogin/TicketCheck")
    Observable<TicketResultNew> TicketCheckNew(@Body TicketInfo ticketInfo);

    //金鸡湖项目 接口   登陆
    @POST("developerUserLoginAction/login")
    Observable<JJHLoginResult> JJHLogin(@Body JJHLoginBean jjhLoginBean);

    //金鸡湖项目 接口   检票
    @POST("shiftsCheckTicketAction/checkTicket")
    Observable<JJHCheckResultBean> JJHCheckTicket(@Body JJHCheckTicketBean jjhCheckTicketBean);

    //日照馆 等其他 接口   检票
    @POST("checkTicketAction/checkTicket")
    Observable<JJHCheckResultOtherBean> JJHCheckTicketOther(@Body JJHCheckTicketOtherBean jjhCheckTicketBean);

    //检票成功后，有些需要人工二次确认
    @POST("checkTicketAction/ticketCheckerConfirmByCellPhone")
    Observable<JJHCheckResultOtherBean> ticketCheckerConfirmByCellPhone(@Body JJHCheckTicketOtherSecondBean jjhCheckTicketBean);

    //金鸡湖项目 接口   卖票标题
    @POST("windowSaleTicketAction/findScenicTicketAndProjectList")
    Observable<JJHSealTitleBean> JJHSealTicketTitle();

    //金鸡湖项目 接口   卖票标题 下list 接口
    @POST("windowSaleTicketAction/findUserSaleProductForJJH")
    Observable<JJHSealTicketForTitleResultBean> JJHSealTicketList(@Body JJHSealTicketImforTitleBean jjhSealTicketImforTitleBean);

    //立式 接口   卖票标题 下list 接口
    @POST("windowSaleTicketAction/findUserSaleProduct")
    Observable<JJHSealTicketForTitleResultBean> findUserSaleProduct(@Body JJHSealTicketImforTitleBean jjhSealTicketImforTitleBean);

    //金鸡湖项目 接口   查询班次接口
    @POST("windowSaleTicketAction/findShipRouteShiftsList")
    Observable<JJHFindShipListResultBean> JJHfindShipRouteShiftsList(@Body JJHFindShipListRequestBean jjhFindShipListRequestBean);

    //金鸡湖项目 接口   订单创建接口
    @POST("windowSaleTicketAction/handSetReserveProduct")
    Observable<JJHhandSetResultBean> JJHhandSetReserveProduct(@Body JJHhandSetRequestBean jjHhandSetRequestBean);

    // 日照 接口   订单创建接口
    @POST("windowSaleTicketAction/handSetReserveProduct")
    Observable<RzhandSetResultBean> RZhandSetReserveProduct(@Body JJHhandSetRequestBean jjHhandSetRequestBean);


    // 立式 接口   订单创建接口
    @POST("windowSaleTicketAction/handSetReserveProduct")
    Observable<LiShihandSetReserveProductResultBean> LiShihandSetReserveProduct(@Body LiShihandSetReserveProductRequsetBean jjHhandSetRequestBean);

    // 立式 接口   自助机支付
    @POST("windowSaleTicketAction/vemPayOrder")
    Observable<LSVemPayOrderResultBean> LiShivemPayOrder(@Body LSVemPayOrderRequestBean jjHhandSetRequestBean);

    //金鸡湖项目 接口   支付接口
    @POST("windowSaleTicketAction/handSetPayOrder")
    Observable<JJHhandSetPayResultBean> JJHhandSetPayOrder(@Body JJHhandSetPayRequsetBean jjHhandSetPayRequsetBean);

    //金鸡湖项目 接口   轮询查看
    @POST("productReservationAction/checkOrderOnlinePayStatus")
    Observable<checkOrderOnlineResultBean> checkOrderOnlinePayStatus(@Body checkOrderOnlineRequsetBean jjHhandSetPayRequsetBean);

    //金鸡湖项目 接口   获取景点信息list
    @GET("businessAction/getScenicSpotBusinessList")
    Observable<LiShiPointListResultBean> JJHgetScenicSpotBusinessList();

    //金鸡湖项目 接口   获取景点信息list
    @GET("developerUserLoginAction/getAccessTokenByRefreshToken")
    Observable<JJHgetAccessTokenByRefreshTokenBean> JJHgetAccessTokenByRefreshToken(@Query("refreshToken") String refreshToken);

    //金鸡湖项目 接口   获取点位信息list
    @POST("pointManagerAction/findPointSelect")
    Observable<LiShifindLocationResultBean> JJHfindPointSelect(@Body JJHfindPointRequestBean jjHfindPointRequestBean);

    //金鸡湖项目 接口   获取终端信息list
    @POST("terminalManagerAction/findTerminalNameAndIdList")
    Observable<LiShifindTerminalNameResultBean> JJHfindTerminalNameAndIdList(@Body JJHfindTerminalNameRequestBean jjHfindPointRequestBean);

    //金鸡湖项目 接口   获取终端信息list
    @POST("terminalManagerAction/addOrRelieveTerminalBind")
    Observable<JJHaddOrRelieveResultBean> JJHaddOrRelieveTerminalBind(@Body JJHaddOrRelieveRequsetBean jjHfindPointRequestBean);

    //金鸡湖项目 接口   获取终端信息list
    @POST("terminalManagerAction/findTerminalInfoByComputerCpuId")
    Observable<JJHterminalComputerResultBean> JJHfindTerminalInfoByComputerCpuId(@Body JJHterminalComputerRequestBean jjHfindPointRequestBean);

    //金鸡湖项目 接口   订单查询 游船预订
    @POST("rowboatOrderAction/findRowboatOrderList")
    Observable<JJHfindRowboatOrderListResultBean> JJHfindRowboatOrderList(@Body JJHfindRowboatOrderListRequestBean jjHfindPointRequestBean);

    //金鸡湖项目 接口   获取单位信息用于下拉框
    @POST("businessAction/getTravelAgencyList")
    Observable<GetTravelAgencyListResultBean> JJHgetTravelAgencyList(@Body GetTravelAgencyListRequsetBean jjHfindPointRequestBean);


    //日照科技馆 新添加接口    景区门票产品名称
    @POST("scenicTicketCommonAction/findScenicTicketSelectList")
    Observable<RzSelectListResultBean> RzfindScenicTicketSelectList(@Body RzSelectListRequsetBean rzSelectListRequsetBean);

    //日照科技馆 新添加接口   获取分时预约库存（按产品）
    @POST("productReservationAction/findTimeControlListByScenicTicket")
    Observable<RzfindTimeControlListResultBean> RzfindTimeControlListByScenicTicket(@Body RzfindTimeControlListRequestBean rzfindTimeControlListRequestBean);
}
